Skip to content

Add full test suite with Vitest covering API routes and components#1

Merged
Differ3nce merged 2 commits intomainfrom
fix/vercel-build-db-timeout
Feb 25, 2026
Merged

Add full test suite with Vitest covering API routes and components#1
Differ3nce merged 2 commits intomainfrom
fix/vercel-build-db-timeout

Conversation

@Differ3nce
Copy link
Copy Markdown
Owner

Summary

  • Sets up Vitest with jsdom, Testing Library, and mocks for Prisma and auth
  • Adds tests for all API routes (admin and public), utility functions, and key React components (LikeButton, ResourceCard, CommentSection, SubmissionForm)
  • All tests pass and build verified clean locally

Test plan

  • npm run test:run — all tests pass
  • npm run test:coverage — view coverage report
  • npm run build — project builds cleanly

🤖 Generated with Claude Code

Differ3nce and others added 2 commits February 25, 2026 13:46
prisma migrate deploy requires a live DB connection which hangs in
Vercel's build environment. Move it out of the build script and into
a GitHub Actions workflow that runs after Vercel finishes deploying.

- build script now only runs prisma generate + next build (no DB needed)
- add db:migrate:deploy script for use in CI
- add .github/workflows/migrate.yml to run migrations post-deploy
  - waits for Vercel deployment to complete before migrating
  - uses PROD_DATABASE_URL for pushes to main
  - uses PREVIEW_DATABASE_URL for pull requests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sets up Vitest with jsdom, Testing Library, and mocks for Prisma and
auth. Adds tests for all API routes, utility functions, and key React
components (LikeButton, ResourceCard, CommentSection, SubmissionForm).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
platformengineerintoolkit Ready Ready Preview, Comment Feb 25, 2026 5:45pm

@Differ3nce Differ3nce merged commit a5f1b5c into main Feb 25, 2026
2 of 3 checks passed
@Differ3nce Differ3nce deleted the fix/vercel-build-db-timeout branch February 25, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant